<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>
        let a = 10;
        let b = 15;
        let c = 4;

        // let temp; // 临时

        if (a > b) {
            // temp = a;
            // a = b;
            // b = temp;
            [a, b] = [b, a]

            // a = 3, b = 5, c = 4
        }

        if (a > c) {
            [a, c] = [c, a]
        }


        if (b > c) {
            [b, c] = [c, b]
        }

        console.log('从小到大输出为：', a, b, c);

    </script>
</body>

</html>